<?php
namespace App\Http\Controllers\Api;

use App\Model\OperationLogs;
use Illuminate\Http\Request;
use App\Model\Settle;

class SettleController extends BaseController
{
    protected $model;

    public function __construct(Request $request)
    {
        parent::__construct($request);
        $this->model = new Settle();
    }

    //公会结算审核
    public function unionSettleAudit(Request $request){
        $res = $this->model->unionSettleAudit($request->all());
        if($res['code'] != self::SUCCESS) {
            return $this->toJson(self::ERROR, [], $res['msg']);
        }
        OperationLogs::createData($request, OperationLogs::UNION, '公会结算审核');
        return $this->toJson(self::SUCCESS);
    }

    //获取公会结算列表
    public function getUnionSettleList(Request $request){
        return $this->toJson(self::SUCCESS, $this->model->getUnionSettleList($request));
    }



}
